Skip to content

Add session.col() method for deferred series expressions#30

Merged
tswast merged 2 commits into
mainfrom
add-col-to-session-6802571468191900858
Feb 21, 2026
Merged

Add session.col() method for deferred series expressions#30
tswast merged 2 commits into
mainfrom
add-col-to-session-6802571468191900858

Conversation

@tswast

@tswast tswast commented Feb 20, 2026

Copy link
Copy Markdown
Collaborator

Implemented col(name) method in Session class in leanframe/core/session.py.
It returns a leanframe.core.series.Series object wrapping an ibis.deferred expression.
Added comprehensive tests covering assign and arithmetic operations with deferred series.


PR created automatically by Jules for task 6802571468191900858 started by @tswast

This method mimics pd.col() from pandas 3.0/Ibis, returning a deferred Series object.
This allows for column selection and expression building without a concrete DataFrame context.

Added tests in `tests/unit/session/test_col.py`.

Co-authored-by: tswast <247555+tswast@users.noreply.github.com>
@google-labs-jules

Copy link
Copy Markdown
Contributor

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

Comment thread leanframe/core/session.py Outdated
"""Return a new expression object which is a deferred series."""
import leanframe.core.series

return leanframe.core.series.Series(ibis.deferred[name])

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jules Please introduce a new expression type for this. Don't use Series here.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've introduced a new leanframe.core.expression.Expression class to handle deferred series expressions, as requested. The col method now returns an instance of this new class instead of Series.

- Added `leanframe/core/expression.py` defining the `Expression` class.
- Updated `Session.col` to return an `Expression` instead of `Series`.
- Updated tests to verify `Expression` usage.

Co-authored-by: tswast <247555+tswast@users.noreply.github.com>
@tswast
tswast merged commit 763b17e into main Feb 21, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant